﻿using CommunityToolkit.Mvvm.Messaging;

namespace MG.SmartHMI.View
{
    /// <summary>
    /// DebugView.xaml 的交互逻辑
    /// </summary>
    public partial class DebugView : System.Windows.Controls.UserControl
    {
        public DebugView()
        {
            InitializeComponent();
            Register();
        }

        private void Register()
        {
            //  EventBus.Default.BindDebugLogAction(WriteUIDebugLogSlot);
            // WeakReferenceMessenger.Default.Register<string, string>(this, "ClearUIDebugLogSignal", ClearUIDebugLogSlot);
        }

        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            WeakReferenceMessenger.Default.Send(string.Empty, "DebugLoadSignal");
        }

        private void UserControl_Unloaded(object sender, System.Windows.RoutedEventArgs e)
        {
            WeakReferenceMessenger.Default.Send(string.Empty, "DebugUnLoadSignal");
        }
    }
}